<?php


namespace App\Entity\Teacher;


use App\Entity\BaseEntity;

/**
 * Class TeacherTaskDto
 * @package App\Entity\Teacher
 * @property string $name
 * @property string $startTime
 * @property string $endTime
 * @property int $targetNum
 * @property int $classesId
 */
class TeacherTaskDto extends BaseEntity
{
    public function rules(): array
    {
        return [
            'name' => 'required',
            'startTime' => 'required',
            'endTime' => 'required',
            'targetNum' => 'required',
            'classesId' => 'required',
        ];
    }

    public function messages(): array
    {
        return [
            'name.required' => '请输入任务名称',
            'startTime.required' => '请输入开始日期',
            'endTime.required' => '请输入结束日期',
            'targetNum.required' => '请输入达标次数',
            'classesId.required' => '请指定班级',
        ];
    }
}
